package cn.bdqn.third;

/**
 * @Description TODO
 * @Date 2020/2/12 9:32
 * @Created by 张三三
 */
public class Printer {

    private Ink ink = null;
    private Paper paper = null;

    /**
     * 打印机 打印的方法
     * @return
     */
    public void print(String str){

        System.out.println(ink.getColor(255,200,0));

        // 输出字符到纸张
        char[] chars = str.toCharArray();
        for(char ch : chars){
            paper.putInChar(ch);
        }

        System.out.println(paper.getContent());
    }

    public Ink getInk() {
        return ink;
    }

    public void setInk(Ink ink) {
        this.ink = ink;
    }

    public Paper getPaper() {
        return paper;
    }

    public void setPaper(Paper paper) {
        this.paper = paper;
    }
}
